#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include<QTableView>
#include<QStandardItem>
#include<QStandardItemModel>
#include<QStackedWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    typedef struct FieldInfo
    {
        QString fieldName;  // 字段名
        QString dataType;   // 数据类型
        int     dateLen;    // 长度
        bool    isNull;     // 是否可以为空
        bool    isPrimaryKey; // 是否为主键
        QString foreignKeyTable; // 外键/表
        QString foreignKeyField; // 外键字段
    }FieldInfo;

private slots:
    void on_actionSQLServer_triggered();

    void on_actionMysql_triggered();

    void on_actionMongoDB_triggered();

    void on_actionRedis_triggered();

    void on_actionGaussDB_triggered();

    void on_actionCreatedatabase_triggered();

    void on_actionCreatetable_triggered();

    void on_actionSelectdepend_triggered();

    void on_actionUpdatedata_triggered();

    void on_actionDeleteobject_triggered();

    void on_actionzhexian_triggered();

    void on_actionShowalltable_triggered();

    void on_actionShowallviewgarph_triggered();

    void on_pushButtonpage0confirm_clicked();

    void on_pushButtonpage2confirm_clicked();

    void on_pushButtonpage3confirm_clicked();

    void on_pushButtonpage6confirmdelete_clicked();

    void on_pushButtonpage5confirmdelete_clicked();

    void on_actionDeletedata_triggered();

    //void on_pushButtonpage1confirmtableview_clicked();

    //void on_pushButtonpage1getvalue_clicked();

    void on_pushButtonpage1newadd_clicked();

    void on_pushButtonpage1confirm_clicked();

    void on_pushButtonpage4confirminsert_clicked();
    void on_pushButtonStopconnect_clicked();


    void on_actionInsertdata_triggered();

private:
    Ui::MainWindow *ui;
    QStandardItemModel *page_0tableforcredatabase;
    QStackedWidget * stackedWidget;
};
#endif // MAINWINDOW_H
